<!doctype html>
<html>
<head>
<include file="public:headtop" />
<link href="/static/css/general.css" rel="stylesheet">
<link href="/static/css/product.css" rel="stylesheet">
</head>

<body>
    <div class="banner">
    	<div class="img-box"><img  src="{$item.img}" alt="icon"></div>
    </div>
	
	<div class="commodity-main-box">
		<div class="border-bottom-string margin-bottom-10">
			<div class="commodity-h1">{$item.title}</div>
			<div class="commodity-h1 oh">
				<span class="beBlock text-blue pull-left">价格：￥{$item.price}</span>
				<!-- <span class="beBlock text-red pull-right">现价：￥<?php echo $item['price']*0.8;?> <span style="font-size: 12px"></span> </span> -->
				<!-- <span class="beBlock text-blue pull-left">售价：￥{$item.price}</span> -->
				<!-- <span class="beBlock text-red pull-right">最低奖励：￥{$item.jianglimax} <span style="font-size: 12px">起</span> </span> -->
			</div>
            <div class="commodity-h2">
                <div class="pull-right">月销量：{$count}{$item.unit}</div>
				适用范围：{$item.syfw}
			</div>
		</div>
		<!--<div class="commodity-h2">已选：型号型号型号型号型号型号型号型号</div>-->
		<div class="commodity-h2 oh">
			<div class="pull-left numText">数量：</div>
			<div class="p_num pull-left">
				<form action="">
					<span class="sy_minus" id="sy_minus_gid1">-</span> 
					<input class="sy_num" id="sy_num_gid1" readonly type="text" name="number1" value="1" /> 
					<span class="sy_plus" id="sy_plus_gid1">+</span>
				</form>
			</div>

            <p class="pull-left" style="margin-left: 5px; margin-top: 3px;">{$item.unit}</p>
		</div>
	</div>
	<div class="commodity-h2 commodityDescribe min-font-size text-center">
		产品参数:<i class="margin-right-5"></i>透光率：{$item.touguangdu}%
		<i class="margin-right-5"></i>隔热率：{$item.geredu}%
		<i class="margin-right-5"></i>防晒指数：{$item.fangshai}%
	</div>
	<ul class="commodityButtonGroup oh">
		<li><a href="javascript:;" id="add_coll">收藏</a></li>
		<li><a href="javascript:;" id="add_cars">加入购物车</a></li>
		<li><a href="javascript:;" class="buy_now">立即购买</a></li>
	</ul>
	<div class="banner">
		<div class="img-box">{$item.xingneng}</div>
	</div>
	<script src="/static/js/plusAndMultiply.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function() {
			initNumberJiajian();
			$('.buy_now').click(function(){
				var url = "{:U('Item/jiesuan',array('id'=>$item['id']))}";
				var num = $('#sy_num_gid1').val();
				
				location.href=url+'&num='+num;
			})
			
			
			$('#add_cars').click(function(){
				var gid = {$item.id};
				$.post(
					"{:U('Item/add_cars')}",
					{gid:gid},
					function(ref){
						ref = eval("("+ref+")");
						if(ref.status){
							alert(ref.msg);
						}else{
							alert(ref.msg);
						}
					}
				);
			})
			$('#add_coll').click(function(){
				var gid = {$item.id};
				var goods = "{$item.title}";
				var price = "{$item.price}";
				$.post(
					"{:U('Item/add_coll')}",
					{gid:gid, goods:goods, price:price},
					function(ref){
						ref = eval("("+ref+")");
						if(ref.status){
							alert(ref.msg);
						}else{
							alert(ref.msg);
						}
					}
				);
			})
		});
	</script>
</body>
</html>